﻿/* ***********************************************
 * Author		:  kingthy
 * Email		:  kingthy@gmail.com
 * Description	:  UserTrend
 *
 * ***********************************************/

using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace OpenTwitter.SDK.Sina.Objects
{
    /// <summary>
    /// 用户的话题
    /// </summary>
    public class UserTrend : ResponseObject
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="xml"></param>
        internal UserTrend(XmlNode xml)
            : base(xml)
        { }

        /// <summary>
        /// 话题Id
        /// </summary>
        public long Id { get; private set; }
        /// <summary>
        /// 热门词
        /// </summary>
        public string Hotword { get; private set; }
        /// <summary>
        /// 数量
        /// </summary>
        public long Num { get; private set; }

        /// <summary>
        /// 解析XML数据
        /// </summary>
        protected override void Parse()
        {
            this.Id = Util.GetXmlNodeValue<long>(this.Xml.SelectSingleNode("trend_id"));
            this.Hotword = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("hotword"));
            this.Num = Util.GetXmlNodeValue<long>(this.Xml.SelectSingleNode("num"));
        }
    }
}
